﻿namespace Dcms.BLL
{
    using Dcms.IDAL;
    using Dcms.Model;
    using System;
    using System.Collections.Generic;

    public class Dcms_ProductsBLL
    {
        private IDcms_ProductsDAL pOp = Dcms.DALFactory.DALFactory.CreateDcms_Products();

        public Dcms_ProductsModel AddModel(Dcms_ProductsModel model)
        {
            return this.pOp.AddModel(model);
        }

        public bool CopyProducts(int SourceCateID, int DestCateID)
        {
            return this.pOp.CopyProducts(SourceCateID, DestCateID);
        }

        public bool DeleteAllCheck(string AllID)
        {
            return this.pOp.DeleteAllCheck(AllID);
        }

        public void DeleteModelByID(int ID)
        {
            this.pOp.DeleteModelByID(ID);
        }

        public string GetDataCount(string SqlStr)
        {
            return this.pOp.GetDataCount(SqlStr);
        }

        public IList<Dcms_ProductsModel> GetDataListByPage(string SqlStr, int CurPage, int PageSize)
        {
            return this.pOp.GetDataListByPage(SqlStr, CurPage, PageSize);
        }

        public Dcms_ProductsModel GetModelByID(int ID)
        {
            return this.pOp.GetModelByID(ID);
        }

        public Dcms_ProductsModel GetNewModelByCatID(int CatID)
        {
            return this.pOp.GetNewModelByCatID(CatID);
        }

        public bool MoveProducts(int SourceCateID, int DestCateID)
        {
            return this.pOp.MoveProducts(SourceCateID, DestCateID);
        }

        public Dcms_ProductsModel Update(Dcms_ProductsModel model)
        {
            return this.pOp.Update(model);
        }

        public void UpDateCount(int ID)
        {
            this.pOp.UpDateCount(ID);
        }

        public bool UpdateState(string AllID, int StateValue)
        {
            return this.pOp.UpdateState(AllID, StateValue);
        }
    }
}

